﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BLL.Utility
{
    public class Campos
    {

        #region -- LimparTextBox --
        public void LimparTextBox(Control controle)
        {
            foreach (Control ctle in controle.Controls)
            {
                TextBox box;
                using (box = ctle as TextBox)
                {
                    if (box != null)
                    {
                        box.Text = string.Empty;
                    }
                    else if (ctle.Controls.Count > 0)
                    {
                        LimparTextBox(ctle);
                    }
                }
            }
        }
        #endregion

    }
}
